<?php
	session_start();
	require('include/inc.start.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<?php include ('common_head.html');?>
	<link href="css/index.css" rel="stylesheet" type="text/css" />
	<title>Welcome to Getub! - The UMass Network</title>
</head>
<body>
	<?php include ('login.php');?>
	<div class="back">
	  <div class="footerBg">
		  <div id="frame">
			<?php include ('header.php');?>
			<div class="mainfrm">
				<form action="/restore_pass.php" method="POST" id="restore">
					<label>To restore forgotten password please provide your email:</label><br />
					<input type="text" name="email" id="email" value="" /><br />
					<input type="submit" name="submit" id="submit" value="Restore" />
				</form>
			</div><!--mainfrm-->
			<?php include ('footer.php'); ?>
		  </div><!--frame-->
	  </div><!--footerBg-->
	</div><!--back -->
	<script type="text/javascript">
	(function ($) {
		$('#restore').submit(function (e) {
			e.preventDefault();
			$.ajax({
				url: this.action,
				dataType: 'json',
				type: 'post',
				data: $(this).serializeArray(),
				success: function (data) {
					if (data.status === 1) {
						$('#email, #submit', this).attr('disabled', true);
						$.fancybox(data.message);
					} else {
						$.fancybox(data.message);
					}
				}
			});
		});
	}(jQuery));
	</script>
</body>
</html>